﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Capstone_project.DatabaseAccessLayer;

namespace Capstone_project.BussnessLogicLayer
{
    class TaskGroupBUS
    {
        ConnectData connData = new ConnectData();
        public DataTable getList()
        {
            string sql = "SELECT * FROM TASK_GROUP";
            return connData.getData(sql, true);
        }
        public DataTable getTaskGrBYPROJECT(string project)
        {
            string sql = "SELECT * FROM TASK_GROUP WHERE ID_PROJECT='"+project+"'";
            return connData.getData(sql, true);
        }
        public string nextID()
        {
            string lastID = connData.getLastID("TASK_GROUP", "ID_TASK_GROUP").Trim();
            return Common.NextID(lastID, "TGR");
        }
    }
}
